package com.joe.learn.jvm;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JobCTask implements JobTask {

    private static final Logger logger = LoggerFactory.getLogger(JobCTask.class.getName());

    private String threadNum;

    public JobCTask(String i) {
        this.threadNum = i;
    }


    @Override
    public void run() {
        long start = System.currentTimeMillis();
        m1();
        logger.info(" 共花费时间：--->{} ", (System.currentTimeMillis() - start));
    }

    private void m1(){
        int i = 0;




        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
//        taskC(i++, this.threadNum);
    }

    private void taskC(int i, String threadNum) {
        JobBean jobBean = new JobBean(i++, "My Code", "第" + threadNum + "个线程", "这是一个测试，需要很长的文字，因此来测试一下。", "测试方法长度偏长，对jvm的性能影响。", new int[1024]);
        jobBean.toLogC();
    }


}
